package com.ruoyi.api.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.ruoyi.api.service.LocalMysqlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author anan.
 * @version 1.0
 * @create 2021-06-18 17-22
 */
@Service
public class LocalMysqlServiceImpl implements LocalMysqlService {

	@Autowired
	private JdbcTemplate jdbcTemplate;

	@Override
	@DS("localmysql")
	public List select(String sql) {
		return jdbcTemplate.queryForList(sql);
	}
}
